package cn.edu.uestc.smgt.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.uestc.smgt.dao.BuzhuCurrentMapper;

@Service
public class BuzhuCurrentService {
	@Autowired
	private BuzhuCurrentMapper buzhuCurrentMapper;

	/**
	 * 单位助管——未提交
	 * 
	 * @param untiId
	 * @return
	 */
	public List dwZG_WTJ(String untiId) {
		HashMap map = new HashMap();
		map.put("unitId", untiId);
		return buzhuCurrentMapper.selectBySelections(map);
	}

	/**
	 * 将excel每行记录以map的形式封装后插入
	 * 
	 * @param map
	 */
	public void addWithMap(HashMap map) {
		// TODO Auto-generated method stub
		map.put("status", 0);
		buzhuCurrentMapper.insertSelectiveByMap(map);
	}

}
